Current software development methods use modeling frameworks and code generation facilities for building applications based on structured data models. Modeling frameworks provide tools to produce a set of classes for data models along with a set of adapter classes that enable viewing and editing of the data models. Software developers use modeling frameworks to create an application model for each software version. An application model's data models, which may number in the dozens, may have a very complex structure and extremely complex relationships, especially when some data models extend other data models. Therefore, upgrading an application model from one software version to another software version may become a complex and difficult task.
Prior art tools can properly migrate data models from one software version to another software version for only a limited set of data model relationships. In a very simple example, an application model for a human resources application has two data model definition files, a model 1 definition file and a model 2 definition file, with each model definition file capable of producing their own instances. The model 1 definition file is for employee data, and includes a property A for an employee's name and a property B for the employee's spouse's name. The model 2 definition file extends the model 1 definition file for the purpose of associated health insurance data. The model 2 definition file extends the property A from the model 1 definition file for the employee's health insurance plan, extends the property B from the model 1 definition file for the employee's spouse's health insurance plan, includes a property C for employer contributions to any employee-selected health insurance plans, and includes a property D for the employee's contributions to any employee-selected health insurance plans. Subsequently, the model 1 definition file's property B for the employee's spouse's name is changed to a property G for the employee's family members' names, and the model 2 definition file's property C for employer contributions to any employee-selected health insurance plans is changed to a property F for federally-mandated employer contributions to any employee-selected health insurance plans. When the human resources application references a model 2 instance, the second property for the model 2 instance references the new property G for the employee's family members' names because the second property of the model 2 instance extends the second property of the model 1 definition file, which was changed to the new property G for the employee's family members' names. Prior art tools record the change to the model 1 definition file in a model 1 history file that is separate from the model 2 history file that records the changes to the model 2 definition file. Then these data model instances may be migrated to become new data model instances that are supposed to be compatible with the new data model definitions for the new version of the human resources application.
Prior art modeling frameworks migrate the change from the model 1 definition file's property B for the employee's spouse's name to the property G for the employee's family members' names for the model 1 instances, and migrate the change from the model 2 definition file's property C for employer contributions to any employee-selected health insurance plans to the property F for federally-mandated employer contributions to any employee-selected health insurance plans for the model 2 instances. However, when the migrated version of the human resources application references a migrated model 2 instance, the second property for the model 2 instance references the old property B for the employee's spouse's name, not the new property G for the employee's family members' names, because the migrated model 2 instance is based on the model 2 history file, which does not include this change that was recorded in the model 1 history file. As a result, changes to the model 1 instances are properly migrated, but changes to the model 2 instances are only partially migrated.